<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商户登录</title>
    <meta http-equiv="Xpassworpassword-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <link  rel="stylesheet"  href="css/base.css">
    <link rel="stylesheet" href="css/common.css">
    <link  rel="stylesheet"  href="css/shop-page.css">
</head>
<body class="bgcolor">
 <div class="login-box">
   <div class="login-padding-content">
       <form id="loginform" name="loginform">
           <div class="login-item-block">
               <p><span>您的手机号</span></p>
               <div class="field username-field">
                   <lable class="field-lable f14 "><i title="手机号">+86</i></lable>
                   <input type="text" class="login-text" id="userphone">
                   <span  class="nickx" href="javascript:void(0)" style="display: block;">
                            <img id="nickx-icon" src="image/icon-del.png" style="width: 16px; height: 16px">
                    </span>
               </div>
           </div>
           <div class="login-item-block">
               <p><span>短信验证码</span></p>
               <div class="field username-field">
                   <lable class="field-lable pr5 "><i title="验证码" class="printcolor">验证码</i></lable>
                   <input type="text" class="login-text" id="getcode-text">
                    <span  class="btngetcode" href="javascript:void(0)" style="display: block;">
                          <input type="button" name="btncode" class="user-send-code" value="获取验证码" id="sendMobeliCode"  onclick="settimeCode(this);"/>
                    </span>
               </div>
           </div>

           <div class="place-an-pagebtn" id="login">
               <span class="f16"  data-backdrop="static">手机号绑定</span>
           </div>

       </form>
   </div>
 </div>
</body>
<script type="text/javascript" src="config/jquery-2.1.4.min.js"></script>
<script type="text/javascript" >
    $(function () {
        $("#nickx-icon").css('display','none');
        //文本框得到焦点事件
        $("#userphone").bind('focus',function () {
            var l = $("#userphone").val().length;
            if(l && l>0){
                $("#nickx-icon").css('display','block');
            }else{
                $("#nickx-icon").css('display','none');
            }
        });
        //监听文本框变化事件
        $("#userphone").bind('input propertychange',function () {
            var l = $("#userphone").val().length;
            if(l && l>0){
                $("#nickx-icon").css('display','block');
            }else{
                $("#nickx-icon").css('display','none');
            }
        });
        //清除输入框
        $("#nickx-icon").click(function () {
            $("#userphone").val("");
        });
        //发送验证码
        var countdown = 60;

        function settimeCode(val) {
           // alert(0);
            if (countdown == 0) {
                val.removeAttribute("disabled");
                val.value="获取验证码";
                return false;

            } else {
                val.setAttribute("disabled", true);
                val.value="重新发送(" + countdown + ")";
                countdown--;
            }
            setTimeout(function() {
                settime_code(val)
            },1000)
        }

        $("#login").click(function () {
            window.location.href = 'ShopList.html';
        })

    });
</script>
</html>